package report

import (
	"context"
	"git.mycaigou.com/gfyx/common/http_client"

	reportDto "git.mycaigou.com/gfyx/micro-gfyx-mp-api/http_server/dto/report"
	micro_gfyx_user_service "git.mycaigou.com/gfyx/micro-gfyx-mp-api/proto/micro_gfyx_user_service_proto/micro-gfyx-user-service"
	"github.com/gin-gonic/gin"
)

type ReportServiceIface interface {
	SetSharerCodeWithReportUrl(ctx *gin.Context, urlUid string) error
	SetTenantCodeWithReportUrl(ctx *gin.Context, urlUid string) error
	GetFormTemplateConfig(ctx context.Context, templateId string) ([]map[string]interface{}, error)
	GetFormDataRule(ctx context.Context, key string) (map[string]interface{}, error)
	GetReportUserList(ctx context.Context) (map[string]interface{}, error)
	GenerateUrl(ctx context.Context, rs *ReportShare) (string, error)
	ReceiveUrl(ctx context.Context, userId, code string) (bool, error)
	ReportList(ctx context.Context, condition *reportDto.ReportFromSharingListRequestDto) (int64, []*micro_gfyx_user_service.ReportFromSharing, error)
	ReportInfo(ctx context.Context, condition *reportDto.ReportInfoRequestDto) (*micro_gfyx_user_service.ReportFromSharing, error)
	SearchContacts(ctx context.Context, condition *reportDto.ReportOptionRequest) (*http_client.BigDataResponse, error)
	GetTeamLeader(ctx context.Context, reportId string) (map[string]interface{}, error)
	FillReportForm(ctx context.Context, params *reportDto.FillReportFormRequest) (map[string]interface{}, error)
	SaveFollowRecord(ctx context.Context, request *reportDto.SaveFollowRecordRequest) error
	GetFollowRecordList(ctx context.Context, reportId string, page int32, pageSize int32) ([]map[string]interface{}, int64, error)

	Save(ctx context.Context, saveReq *reportDto.SaveRequest) (bool, string, error)

	GetReport(ctx context.Context, reportId string) (map[string]interface{}, error)

	GetMyReportList(ctx context.Context, requestDto *reportDto.ReportMyListRequestDto) (*reportDto.ReportMyListResponseDto, error)
	GetRegionReportList(ctx *gin.Context, requestDto *reportDto.ReportMyListRequestDto) (*reportDto.ReportMyListResponseDto, error)

	GetReportStat(ctx context.Context) (*reportDto.MyReportStatResponse, error)

	UpdateReportShare(ctx context.Context, userUid string, code string, data *micro_gfyx_user_service.ReportFromSharing) (bool, error)
}
